package com.candy.control;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author donglin
 * @Title:
 * @类名: ${NAME}
 * @date 2020/8/18
 */
//@WebServlet(name = "UserLoginServlet")
public class UserLoginServlet extends HttpServlet {
    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        request.setCharacterEncoding("UTF-8");
        response.setCharacterEncoding("UTF-8");
        String adminName= request.getParameter("adminName");
        String adminPwd= request.getParameter("adminPwd");
        System.out.println("登录的用户名："+adminName+"，登录的密码："+adminPwd);
        request.getRequestDispatcher("index.jsp").forward(request,response);
    }
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }
}
